package com.ftg.learn.day09;

/**
 * 学习一下isA
 *
 * 设计一个字典
 *
 *
 * @author 布衣
 */
public class LearnIsA {

    int Person_num01 = 13;
    final int Person_num02 = 14;
    static final int Person_num03 = 15;

    public static void main(String[] args) {
        CnEnDic ced01 = new CnEnDic();
        //方法重写 ： 子类覆写父类的同名方法
        //汉英  实例化的是谁，就调谁的方法
        MyDic ced = new CnEnDic();
        System.out.println(ced.find("中国"));

        EnCnDic ecd01 = new EnCnDic();
        ecd01.addReport("美国","PL","dsss");

        System.out.println(ecd01.find("PL"));
        System.out.println(ecd01.find("china"));

        //英汉
        MyDic ecd = ecd01;
        System.out.println(ecd.find("china"));


        //1 : A -》 B-》C  层级越多 实例速度慢

        DicNet dn = new EnCnDic();
        dn.addReport("美国","PL","dsss");
        DicNet dn1 = new CnEnDic();
    }

}
